Use Case - Analyze a Code Project Built using an Executable Script on Windows

The following example assumes that you are not using one of the IDEs described at the beginning of this document (that is, Eclipse or Microsoft’s Visual Studio), and are instead using a build method similar to the previous example. The choice has been made to use the command line-based Development system provided by the Cygwin tools.

There is a simple code project with the structure shown on page 1.

Using the command line build tools, this project is currently built using the following command:

g++ -o outputFile hello.cpp hello2.cpp ./subDirectory/code.cpp

The g++ (i.e. the GCC C++) compiler is part of the installed Cygwin tools.

Alternatively, you could have a simple Makefile, and then run it using the make command:

CXX = g++ 
all:
    $(CXX) -o outputFile hello.cpp hello2.cpp \
    ./subDirectory/code.cpp
clean:

The code project will not need to be altered in any way; the Helix QAC software can analyze it without any changes as long as you can provide a single command to be run that will work from any directory, as in the previous Linux example.

In Windows systems, it is common to use a *.bat (Windows batch) file for simple scripting, containing a single executable script that will run the code build, for example:

make -C c:\user\test_projects\test01

This is what we will use in this example.

You can now analyze the code using the Helix QAC GUI. After starting the GUI, create a new project, using the "Create New Project" button towards the top left of the GUI, just as in the previous example.

You are now presented with a dialog box in which you specify the "Project Location". This is simply the name of the directory containing the code project, in this example simpleTest02. A "Project Name" can also be added - this is a textual name/description for the project.

You must also specify the compiler being used; a large number of options are presented and it is important that you make the correct selections. In this case, you would select the appropriate Cygwin compiler. This is all that is needed for this simple project. After clicking "Create", you are presented with the "Project Properties".

This straightforward case requires no change from the defaults, so simply close the dialog.

The Helix QAC software will now monitor the build process to gather the information it needs in order to identify the source files and other configuration information it requires. Select Synchronize from the Project Menu.

You now need to identify the batch file that will be run as the script to conduct the software build.

Check the Run Analysis at Same Time box at the bottom of the dialog if you wish the project files to be analyzed at the same time as they are being built.
Because this example only involves a straightforward command, you could, as an alternative to specifying the batch file, simply enter the complete command in the Enter Build Command field, that is:
make -C c:\user\test_projects\test01

When you click "Synchronize", the build begins, with the Helix QAC software monitoring it.

The number of diagnostics listed in the left window has changed, and the Progress window indicates that the code project files have been identified and scanned successfully.